
package com.bluelinelabs.conductor.conductor;

import ohos.agp.components.AttrSet;
import ohos.agp.components.ComponentContainer;
import ohos.agp.components.StackLayout;
import ohos.app.Context;

/**
 * lipeiquan
 *
 * @since 2021-05-06
 */
public class ChangeHandlerFrameLayout extends StackLayout implements ControllerChangeHandler.ControllerChangeListener {

    private int inProgressTransactionCount = 0;

    public ChangeHandlerFrameLayout(Context context) {
        super(context);
    }

    public ChangeHandlerFrameLayout(Context context, AttrSet attrSet) {
        super(context, attrSet);
    }

    public ChangeHandlerFrameLayout(Context context, AttrSet attrSet, String styleName) {
        super(context, attrSet, styleName);
    }

    @Override
    public void onChangeStarted(Controller to, Controller from, boolean isPush, ComponentContainer container, ControllerChangeHandler handler) {
        inProgressTransactionCount++;
    }

    @Override
    public void onChangeCompleted(Controller to, Controller from, boolean isPush, ComponentContainer container, ControllerChangeHandler handler) {
        inProgressTransactionCount--;
    }


}
